package com.lgw.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.lgw.demo.pojo.User;
import com.lgw.demo.service.PersonOrderService;
import com.lgw.demo.service.PersonService;
import com.lgw.demo.service.UserServcie;

@Controller
public class PersonOrderController {
    //多对多 订单 商品
    //设计表 订单表 商品表 中间表
    //JSON语法的增删改查
    //查询
    @Autowired//注入
    PersonOrderService personOrderService;

    @RequestMapping("personorderlist")
    public String personorderlist(Model model){
        model.addAttribute("list",personOrderService.getAllPersonOrder());
        return "personorderlist.html";
    }


}
